Add Google Drive and OneDrive sync providers with OAuth 2.0 authentication#595
Merged
farfromrefug merged 10 commits intomainfrom Mar 27, 2026
Merged
Add Google Drive and OneDrive sync providers with OAuth 2.0 authentication#595farfromrefug merged 10 commits intomainfrom
farfromrefug merged 10 commits intomainfrom
Conversation
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com> Agent-Logs-Url: https://github.com/Akylas/OSS-DocumentScanner/sessions/e44ecfbf-dc8f-47c0-b15c-1bbe320da960
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com> Agent-Logs-Url: https://github.com/Akylas/OSS-DocumentScanner/sessions/e44ecfbf-dc8f-47c0-b15c-1bbe320da960
…view and documentation Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com> Agent-Logs-Url: https://github.com/Akylas/OSS-DocumentScanner/sessions/e44ecfbf-dc8f-47c0-b15c-1bbe320da960
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com> Agent-Logs-Url: https://github.com/Akylas/OSS-DocumentScanner/sessions/e44ecfbf-dc8f-47c0-b15c-1bbe320da960
Copilot
AI
changed the title
[WIP] Add new sync service providers for Google Drive and OneDrive
Add Google Drive and OneDrive sync providers with OAuth 2.0 authentication
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Google Drive and OneDrive as sync service providers following the existing WebDAV pattern. Implements OAuth 2.0 with PKCE through modal webview for authentication.
Implementation
6 New Sync Services (Data/Image/PDF variants):
GoogleDriveDataSyncService,GoogleDriveImageSyncService,GoogleDrivePDFSyncServiceOneDriveDataSyncService,OneDriveImageSyncService,OneDrivePDFSyncServiceSERVICES_TYPE_MAPandSYNC_TYPESOAuth Infrastructure:
OAuthHelper.ts- OAuth 2.0 flow with PKCE, token refresh, secure storageOAuthWebViewModal.svelte- Modal webview intercepts redirect URI with auth codeOAuthSettingsView.svelte- Reusable authentication UI componentProvider APIs:
GoogleDrive.ts- Drive API v3 wrapper (multipart upload, folder ops, file CRUD)OneDrive.ts- Microsoft Graph API wrapper (simple upload, item navigation)UI Integration:
GoogleDriveDataSyncSettings.svelte- Settings screen with OAuth flowSyncListSettings.svelteto handle new service typessync.tsArchitecture
Follows existing patterns:
Uses existing dependencies only:
@nativescript-community/ui-webviewfor OAuth modal@nativescript-community/httpsfor API requestsConfiguration Required
Google Drive: Update
GOOGLE_DRIVE_PROVIDER.config.clientIdinGoogleDrive.tsOneDrive: Update
ONEDRIVE_PROVIDER.config.clientIdinOneDrive.tsSee
CLOUD_SYNC_SETUP.mdfor credential setup instructions.Limitations
Files Changed
18 files, 2,544 lines added:
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.